#if !defined(AFX_MANUALALIGN_H__E65D5BF9_6EDB_4079_A4FF_F6FC1342111E__INCLUDED_)
#define AFX_MANUALALIGN_H__E65D5BF9_6EDB_4079_A4FF_F6FC1342111E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ManualAlign.h : header file
//
#define  MAX_AL_PUSH_SW 4

#include "Util\MinButton.h"
#include "Util\MinLabel.h"
// Hardware Layer
class IIO;
// Control Layer
class IAlign;
// Process Layer
class IAutoManager;
class ITrsAlign;

// Common Layer
class CDMControlCenter;
class CErrorCodeData;
class CSystemData;
class CModelData;
class CAlignPosData;

/////////////////////////////////////////////////////////////////////////////
// CManualAlign dialog

class CManualAlign : public CDialog
{
// Construction
private:
	IAlign* m_lnkAlign;
	ITrsAlign* m_lnkTrsAlign;

	CErrorCodeData* m_lnkErrorCodeData;
	CSystemData* m_lnkSystemData;
	CModelData* m_lnkModelData;
	CAlignPosData* m_lnkAlignPosData;

	void ErrorDisplay(int nErrorCode);
	BOOL m_bErrorDisplay;
	
	BOOL StartInitFlag;
	BOOL m_bOldStatusPush[MAX_AL_PUSH_SW];

public:
	UINT m_TimerID;
	BOOL m_TimerInitFlag;

	CManualAlign(IAutoManager* pAM,CDMControlCenter* pDMCC,CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CManualAlign)
	enum { IDD = IDD_MANUAL_ALIGN };
	CMinButton	m_bExit;
	CMinButton	m_bAlignVacOn;
	CMinButton	m_bAlignVacOff;
	CMinButton	m_bAlignReady;
	CMinButton	m_bAlignNotch;
	CMinButton	m_bAlignEnd;
	CMinButton	m_bAlignCylDown;
	CMinButton	m_bAlignCylUp;
	CMinButton	m_bAlignCen;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CManualAlign)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL
public:
// Implementation
protected:
	void ButtonInitial();
	void ButtonUpdate();
	// Generated message map functions
	//{{AFX_MSG(CManualAlign)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnExit();
	afx_msg void OnAlignVacOn();
	afx_msg void OnAlignVacOff();
	afx_msg void OnAlignReady();
	afx_msg void OnAlignNotch();
	afx_msg void OnAlignEnd();
	afx_msg void OnAlignCylDown();
	afx_msg void OnAlignCylUp();
	afx_msg void OnAlignCen();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MANUALALIGN_H__E65D5BF9_6EDB_4079_A4FF_F6FC1342111E__INCLUDED_)
